<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
<h2>前台登录页</h2>
<form  th:action="@{/userlogin}"  method="post">
    name:<input type="text" name="name" th:value="${session.userinfo == null}?jim:${session.userinfo.name}" />
    pass:<input type="password" name="pass" th:value="${session.userinfo == null?'1234':session.userinfo.pass}" />
    <input type="submit" value="登录" />&nbsp;&nbsp;&nbsp;
    <a href="reg" >注册</a> &nbsp;&nbsp;&nbsp;<a href="adminlogin" >进入后台</a>
</form>
 <div th:if="${session.uerr != null}" style="color:red; border: 1px solid red; width: 200px; ">用户名或密码错误
     [(${#session.removeAttribute('uerr')})]</div>

<!--<p th:if="${#session.getAttribute('regok') != null}">
    <script type="text/javascript"> alert("注册成功 请登录!") </script>
    <span th:text="${#session.removeAttribute('regok')}"></span>
</p>-->
</body>
</html>